package cn.edu.nju.askme.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.edu.nju.askme.dao.IQuestionDAO;
import cn.edu.nju.askme.model.Question;
import cn.edu.nju.askme.service.IQuestionService;

@Component
public class QuestionService implements IQuestionService{
	private IQuestionDAO questionDAO;
	
	public IQuestionDAO getQuestionDAO() {
		return questionDAO;
	}
	@Resource
	public void setQuestionDAO(IQuestionDAO questionDAO) {
		this.questionDAO = questionDAO;
	}

	public void add(Question question) {
		System.out.println("QuestionService.add()");
		questionDAO.save(question);
	}

}
